﻿using System;

namespace 匿名函数
{
	class Program
	{
		public delegate void DelSayHi(string name);
		static void Main(string[] args)
		{
			//匿名函数
			DelSayHi del = delegate (string name)
			{
				 Console.WriteLine("你好"+name);
		    };
			//lamda表达式
			//=>:goet to 滚去做
			DelSayHi del2 = (string name) => { Console.WriteLine("你好" + name); };
			del2("张3");
			del("张闪");
		}
	}
}
